#!/usr/bin/env python3
# -*- coding: utf-8 -*-
b = bytes.fromhex

s_name =  "NGEE 16D00H~16F30H	007 Goldeneye (USA)"
sample = b("""27BDFFA0 8FB80070 3C0E8006 25CE7D70 240F0002 24010001 AFBF001C AFA40060
              AFA50064 AFA60068 AFA7006C AFB00018 AFA0005C AFAE0054 13010009 AFAF0028
              97B9006A 2B210007 10200005 00000000 13200003 00000000 10000070 00001025
              0C005798 00000000 24080003 3C018006 A0287CE0 8FA40064 97A5006A 0C0058CC
              8FA6006C 3C058006 24A57D70 0C0057B4 24040001 AFA2005C 8FA40060 00002825
              0C003774 24060001 AFA00058 8FAA0058 8FAC0058 3C018006 000A5880 002B0821
              240900FF AC297D70 258D0001 29A10010 1420FFF6 AFAD0058 3C018006 3C058006
              AC207DAC 24A57D70 0C0057B4 00002025 AFA2005C 8FA40060 00002825 0C003774
              24060001 8FAF0064 3C0E8006 25CE7D70 11E0000C AFAE0054 19E0000A AFA00058
              8FA80058 8FA90064 8FB80054 250A0001 0149082A 27190001 AFAA0058 1420FFF8
              AFB90054 8FAC0054 27AB002C 258E0024 89810000 99810003 258C000C 256B000C
              AD61FFF4 8981FFF8 9981FFFB AD61FFF8 8981FFFC 9981FFFF 158EFFF5 AD61FFFC
              89810000 99810003 AD610000 93AF002E 31F800C0 0018C903 17200013 AFB9005C
              0C00580C 8FA4006C 93A80052 1048000E 00000000 8FA40060 0C0051FD 8FA50064
              AFA2005C 8FAA005C 11400005 00000000 0C0057A9 00000000 10000010 8FA2005C
              24090004 AFA9005C 8FAD005C 24010004 15A10007 00000000 8FAE0028 29D00000
              3A100001 25CCFFFF 1600FFA7 AFAC0028 0C0057A9 00000000 8FA2005C 8FBF001C
              8FB00018 27BD0060 03E00008 00000000""")

s_mask = b("""FFFFFFFF FFFFFFFF FFFF0000 FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              00000000 FFFFFFFF FFFFFFFF FFFF0000 FFFF0000 FFFFFFFF FFFFFFFF 00000000
              FFFFFFFF FFFF0000 FFFF0000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFF0000 FFFFFFFF FFFFFFFF
              FFFFFFFF FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFF0000 FFFF0000
              FFFF0000 FFFF0000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000
              FFFFFFFF FFFFFFFF FFFF0000 FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF""")

symbol = (('+', 'V0 = errors reading from slot address A2 of controller A1 to A3 using queue A0', 0x6FFFF400),
          )

# 0xE4 of 0x230; incorporates function to generate requests, replacing an existing function.
p_data = b("""27BDFFE0 8FA30030 AFBF001C AFA40020 AFA50024 14600005 AFA60028 10C00003
              2CC20007 1440002C 00001025 0C000000 AFA7002C 3C038000 8C610388 10200011
              8FA50024 00052880 8FA60068 00652821 8C680384 8CA50374 00063140 50A0001B
              24020001 00C8082B 10200004 00A62021 8FA5006C 0C000000 24060020 10000013
              00001025 3C080000 3C090000 24010103 2403FFFE 000528C0 A5030028 00A31006
              A1210000 AD020000 24030023 A5010004 A1030003 8FA40020 8FA50024 8FA60028
              8FA7002C 0C000000 AFA10010 0C000000 AFA20018 8FA20018 8FBF001C 03E00008
              27BD0020""")

p_cmds = ((0x2C, 0x60, 4),
          ('l', 0x74, 'fastcopy', 4),
          (0x8A, 0x6E, 2),
          (0xA2, 0x72, 2),
          (0x86, 0xA, 2),
          ('+', 0x9A, 0xE, 2),
          ('+', 0xA6, 0xE, 2),
          ('+', 0xAE, 0xE, 2),
          ('+', 0xB2, 0xE, 2),
          ('l', 0xC4, 'V0 = errors reading or writing (SP+10) b/w address A2 of controller slot A1 & A3 using queue A0', 4),
          (0xCC, 0x210, 4),
          )
